﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using V5_Common;

namespace V5_EShop.API.Login {
    /// <summary>
    /// Login 的摘要说明
    /// </summary>
    public class Login : IHttpHandler {
        HttpContext context;
        public void ProcessRequest(HttpContext _context) {
            context = _context;
            context.Response.ContentType = "text/plain";
            string Action = InputHelper.SetString(context.Request["Action"]);
            switch (Action) {
                case "checklogin":
                    CheckLogin();
                    break;
                case "logout":
                    break;
            }
        }

        public bool IsReusable {
            get {
                return false;
            }
        }

        private void CheckLogin() {
            string UserName = InputHelper.SetString(context.Request["uid"]);
            string UserPwd = InputHelper.SetString(context.Request["pwd"]);
            string UserCode = InputHelper.SetString(context.Request["code"]);
            //var model = bll.UserLogin(UserName,
            //    InputHelper.MD5(UserPwd, 16));
            //if (model != null) {
            //}
        }

        private void LogOut() {

        }

        private void Reg() {

        }
    }
}